Skip to content

fix(website): the Functions page could not draw the only broken function - #1124

Merged
gHashTag merged 2 commits into
mainfrom
fix/functions-catalog-blind-five
Oct 4, 2026
Merged

gHashTag merged 2 commits into
mainfrom
fix/functions-catalog-blind-five

Conversation

@gHashTag

@gHashTag gHashTag commented Sep 22, 2026 •

Copy link
Copy Markdown
Owner

The site's Functions page drew 28 cards. The deployed app registers 33.

GET /api/inngest/functions/status on the bot answered on 2026-09-22 with 33
functions; apps/website/public/functions/spec-functions.json carried 28. The
set difference is five live-only rows and nothing catalog-only -- a strict
subset, so this change is purely additive.

Those five carry 448 of the week's runs and all five failed runs in the whole
project
. Every one of them belongs to crm-proactive-sweep, the only function
anywhere with failed > 0. Card membership was frozen at build time while the
run counters are polled live, so no amount of polling could make the broken card
appear: the page was structurally incapable of showing the one thing that was
wrong.

function domain cron runs 7d failed
crm-proactive-sweep crm */30 * * * * 337 5
ton-pending-watch money 0 * * * * 94 0
club-invoice-abandoned-watch analytics 20 * * * * 11 0
robokassa-unclaimed-watch money 20 7 * * * 4 0
client-telemetry-daily analytics 0 7 * * * 2 0

Five .t27 function specs and five Inngest cron cards are added, read from the
bot source at 05fd960. The code witness public/functions/manifest.json gains
the five matching rows, copied from the bot's own functions manifest and marked
read_at; deployedApp.mainRegisters moves 28 -> 33 and baseFunctions stays
24, because 24 is still what the 2026-09-09 probe pass measured. The catalogs
were regenerated by running the generator, not edited.

Two spec fields deliberately disagree with the witness and the cards say so:
SIDE_EFFECTS reads messages-owners because the outreach card goes to the
seller who owns the bot rather than the end client, and GUARD reads
safe-mode because all five stop a probe at the same isSafeMode early return.

{
  "version": 1,
  "head_sha": "292d74ed91aa996ec155c39029f7d2e48eb07d0b",
  "summary": "The site's Functions page drew 28 cards while the deployed app registers 33, and the five it could not draw carried every failed run in the project; five function specs, five Inngest cron cards and five code-witness rows close that gap.",
  "changes": [
    "Adds five .t27 function specs under apps/website/public/t27/files/specs/functions/ for crm-proactive-sweep, ton-pending-watch, robokassa-unclaimed-watch, club-invoice-abandoned-watch and client-telemetry-daily, each read from the bot source at commit 05fd960.",
    "Adds the five matching Inngest cron cards under apps/website/public/t27/files/specs/crons/, which is what joins a cron function to its schedule card.",
    "Extends the code witness apps/website/public/functions/manifest.json with the five rows, each carrying read_at 05fd960, records their deployment as null (unread) rather than false, and moves deployedApp.mainRegisters from 28 to 33.",
    "Adds ten Russian entries to apps/website/i18n/agents.ru.json so locale coverage stays complete, and updates scripts/agents-from-specs.test.mjs from 28 function specs to 33 with the new facts pinned.",
    "Merge of origin/main (155 commits behind): conflicts were only in the generated catalogs spec-agents, spec-crons, system-docs, spec-functions, spec-skills and spec-tools; main's versions were taken and then regenerated with scripts/agents-from-specs.mjs, which also refreshed spec-providers.json, so the five specs are counted on top of main (functions 33, crons 38)."
  ],
  "tests": [
    {
      "command": "Website checks / checks job on head 292d74ed",
      "status": "failed",
      "result": "The job stopped at the Silicon coverage step, which also fails on main for the unclassified spec gf16_attn.t27; the typecheck ratchet and API contract steps passed before it, and the Catalog generators step was skipped.",
      "evidence": "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/gHashTag/trinity/actions/runs/37224990933/job/111502704908"
    },
    {
      "command": "CI / Build & Test",
      "status": "passed",
      "result": "The repository Build and Test job completed successfully on this head.",
      "evidence": "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/gHashTag/trinity/actions/runs/37224990915/job/111502704689"
    },
    {
      "command": "Docs check / Check Documentation Links",
      "status": "failed",
      "result": "The documentation link check failed on this head; it is not a required check and was not investigated in this merge.",
      "evidence": "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/gHashTag/trinity/actions/runs/37224987586/job/111502696409"
    }
  ],
  "limitations": [
    "The catalog generator check and agents-from-specs tests did not run in CI on this head because the website checks job stops at the Silicon coverage failure inherited from main.",
    "Deployment of the five functions is recorded as unread; the 2026-09-09 probe pass predates their registration and was not repeated here.",
    "Two spec fields deliberately differ from the vendored manifest (SIDE_EFFECTS of crm-proactive-sweep and GUARD safe-mode on all five), and the cards say so."
  ],
  "tags": [
    "Functions",
    "Inngest",
    "SpecCatalog"
  ],
  "blog": {
    "title": "The Functions page can now draw the one function that was failing",
    "summary": "The build-time catalog of Inngest functions listed 28 while the live app registered 33, and the five missing ones held every failed run; five specs, cron cards and witness rows now put them on the page.",
    "outline": [
      "Card membership on the Functions page is decided at build time while run counters are polled live, so a function missing from the catalog could never appear however often the page polled.",
      "The five live-only functions were read from the bot source at a pinned commit and written as .t27 specs with matching cron cards, joining each cron function to its schedule card.",
      "Their deployment is recorded as unread rather than false, because the earlier probe pass predates their registration while the live endpoint answered for all five.",
      "After merging a long-diverged main, the generated catalogs were taken from main and regenerated from the specs rather than hand-merged, so the counts rest on the generator and not on an edit."
    ]
  }
}

The live status endpoint of 999-multibots-telegraf answered on 2026-09-22
with 33 registered functions. The site's build-time catalog carried 28.
The difference is a strict subset -- five live-only rows, nothing catalog-
only -- and those five carry 448 of the week's runs and all five failed
runs in the entire project. crm-proactive-sweep is the only function
anywhere with failed > 0, and it was not in the catalog at all.

Card membership is decided at build time while the run counters are
polled live, so no amount of polling could make the broken card appear:
the page was structurally incapable of showing the one thing that was
wrong. That is what this changes.

Five function specs and five Inngest cron cards are added, read from the
bot at 05fd960 (crmProactiveSweep.ts:101, tonPendingWatch.ts:51,
robokassaUnclaimedWatch.ts:44, clubInvoiceAbandonedWatch.ts:22,
clientTelemetryDaily.ts:62). The code witness public/functions/manifest.json
gains the five matching rows, copied from the bot's own functions manifest
and marked read_at 05fd960; mainRegisters goes 28 -> 33.

Their deployment is recorded as unread (deployed_2026_09_09 null), not
false. The false three of them still carry upstream is the 2026-09-09
probe pass, which predates their registration -- and the live endpoint
answered for all five. baseFunctions stays 24 because 24 is still what
that pass measured.

Two spec fields deliberately disagree with the manifest and say so on the
card: the outreach card of crm-proactive-sweep goes to the seller who owns
the bot, not to the end client, so SIDE_EFFECTS reads messages-owners and
not messages-user; and all five stop a probe at the same isSafeMode early
return, so GUARD reads safe-mode where the manifest recorded none. The
manifest's db-read is dropped because the catalog vocabulary has no such
value; each card states the read in NOTE instead.

The catalogs are regenerated by scripts/agents-from-specs.mjs, not edited.
@github-actions github-actions Bot added the status:in-progress 🔵 Agent working label Sep 22, 2026
@gHashTag

gHashTag commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

Reviewer bee Y: not merged -- CONFLICTING with main. The defect is still real: origin/main has no crm-proactive-sweep in apps/website/public/functions/*.json, so the Functions page still cannot draw the one function with failed runs. Needs a rebase (and the 33-vs-28 counts re-measured against the live /api/inngest/functions/status) before review; after the rebase the work report must be refreshed for the new head.

@gHashTag

gHashTag commented Oct 2, 2026

Copy link
Copy Markdown
Owner Author

bee review: left open -- CONFLICTING with main (head d807d96). It edits generated catalogues (public/*/spec-*.json, functions/manifest.json) that the nightly t27-worlds refresh rewrites (#1245, #1257), so it will conflict again on every refresh. Regenerate from the current catalogue rather than rebasing by hand. No credentials.

Conflicts were only in generated catalogs (spec-agents, spec-crons,
system-docs, spec-functions, spec-skills, spec-tools). Took main's
versions, then regenerated with node scripts/agents-from-specs.mjs so the
five added function and cron specs are counted on top of main
(functions 28 -> 33, crons 33 -> 38); --check reports a match and
agents-from-specs.test.mjs passes 57/57.
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

X Brain Health Check

Score: 100.0/100
Status: 🟢 HEALTHY
Threshold: 80/100

X Brain is above merge threshold

@gHashTag
gHashTag merged commit 47a07ee into main Oct 4, 2026
28 of 30 checks passed
@github-actions github-actions Bot added status:completed Done and removed status:in-progress 🔵 Agent working labels Oct 4, 2026
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

🧪 Brain Stress Test Results

Tests: 261/261 passed, 0 leaked
Status: 🟢 PASS
Gate: every test in zig build test-brain-stress passes and none leaks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants